package com.ktwlsoft.archivemanage.domain.business.repositoryService;

import com.ktwlsoft.archivemanage.domain.dao.entity.TransferHistory;
import com.ktwlsoft.archivemanage.domain.dao.repository.TransferHistoryMapper;
import org.springframework.stereotype.Service;

@Service
public class TransferHistoryRepositoryService {

    private final TransferHistoryMapper transferHistoryMapper;

    public TransferHistoryRepositoryService(TransferHistoryMapper transferHistoryMapper) {
        this.transferHistoryMapper = transferHistoryMapper;
    }

    public int insert(TransferHistory transferHistory){
        return transferHistoryMapper.insert(transferHistory);
    }

    public int delete(Long businessId){
        return transferHistoryMapper.deleteByBusinessId(businessId);
    }

    public String getByBusinessId(Long businessId) {
        return transferHistoryMapper.selectByBusinessId(businessId);
    }
}
